<%@page import="com.baozun.util.items.SelectSet"%>
<%@page import="com.baozun.util.StringUtil"%>
<%@page import="com.baozun.model.TContact"%>
<%@page import="com.baozun.model.TWorkrecord"%>
<%@page import="java.util.List"%>
<%@page import="com.baozun.util.CommonConst"%>
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="utf-8" />
<title>首页</title>

<meta name="description" content="overview &amp; stats" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- basic styles -->

<link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="../assets/css/font-awesome.min.css" />

<!--[if IE 7]>
		  <link rel="stylesheet" href="../assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

<!-- page specific plugin styles -->

<!-- fonts -->

<link rel="stylesheet" href="../assets/css/font.css" />

<!-- ace styles -->

<link rel="stylesheet" href="../assets/css/ace.min.css" />
<link rel="stylesheet" href="../assets/css/ace-rtl.min.css" />
<link rel="stylesheet" href="../assets/css/ace-skins.min.css" />

<!--[if lte IE 8]>
		  <link rel="stylesheet" href="../assets/css/ace-ie.min.css" />
		<![endif]-->

<!-- inline styles related to this page -->

<!-- ace settings handler -->

<script src="../assets/js/ace-extra.min.js"></script>

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

<!--[if lt IE 9]>
		<script src="../assets/js/html5shiv.js"></script>
		<script src="../assets/js/respond.min.js"></script>
		<![endif]-->
</head>
<%
List<TWorkrecord> workrecordList = (List<TWorkrecord>)request.getAttribute(CommonConst.REQUEST_WORKRECORD_LIST);
List<TContact> contactList = (List<TContact>)request.getAttribute(CommonConst.REQUEST_CONTACT_LIST);
%>
<body>
	<div class="row">
		<div class="col-sm-5">
			<div class="widget-box transparent">
				<div class="widget-header widget-header-flat">
					<h4 class="lighter">
						<i class="icon-star orange"></i>联系人
					</h4>

					<div class="widget-toolbar">
						<a href="#" data-action="collapse"> <i class="icon-chevron-up"></i>
						</a>
					</div>
				</div>

				<div class="widget-body">
					<div class="widget-main no-padding">
						<table class="table table-bordered table-striped">
							<thead class="thin-border-bottom">
								<tr>
									<th>序号</th>
									<th><i class="icon-caret-right blue"></i> 姓名</th>

									<th><i class="icon-caret-right blue"></i> 公司</th>
									
									<th class="hidden-480"><i class="icon-caret-right blue"></i>
										联系号码</th>
								</tr>
							</thead>

							<tbody>
							<%
							int index = 1;
							for(TContact contact : contactList){ %>
								<tr>
									<td><%=index++%></td>
									<td><%=StringUtil.param2Html(contact.getStContactName())%></td>
									<td><%=StringUtil.param2Html(contact.getStUnitName()) %></td>
									<td><%=StringUtil.param2Html(contact.getStTelephone()) %></td>
								</tr>
							<% }%>
							</tbody>
						</table>
					</div>
					<!-- /widget-main -->
				</div>
				<!-- /widget-body -->
			</div>
			<!-- /widget-box -->
		</div>
<div class="col-sm-5">
			<div class="widget-box transparent">
				<div class="widget-header widget-header-flat">
					<h4 class="lighter">
						<i class="icon-star orange"></i> 未完成工作
					</h4>

					<div class="widget-toolbar">
						<a href="#" data-action="collapse"> <i class="icon-chevron-up"></i>
						</a>
					</div>
				</div>

				<div class="widget-body">
					<div class="widget-main no-padding">
						<table class="table table-bordered table-striped">
							<thead class="thin-border-bottom">
								<tr>
									<th>序号</th>
									<th><i class="icon-caret-right blue"></i> 标题</th>

									<th><i class="icon-caret-right blue"></i> 日期</th>

									<th class="hidden-480"><i class="icon-caret-right blue"></i>
										完成状态</th>
								</tr>
							</thead>

							<tbody>
							<%
							index = 1;
							for(TWorkrecord workrecord : workrecordList){
							%>
								<tr>
									<td><%=index++ %></td>
									<td><%=StringUtil.param2Html(workrecord.getStTitle()) %></td>
									<td><small> <s class="red"><%=StringUtil.param2Html(workrecord.getDtCreateTime(),"yyyy-MM-dd") %></s></td>
									<td><%=SelectSet.getCaptionById(SelectSet.getFinishLevel(), workrecord.getStFinishLevel())%></td>
								</tr>
							<%} %>
							</tbody>
						</table>
					</div>
					<!-- /widget-main -->
				</div>
				<!-- /widget-body -->
			</div>
			<!-- /widget-box -->
		</div>
	</div>
	<script type="text/javascript" src="../assets/js/jquery-2.0.3.min.js"></script>
	<script type="text/javascript">
	jQuery(function($) {
		window.iframeResize = function(){
	        var  dvalue = 0;  
	       // if($.browser.safari){  
	       //     dvalue = 67; 
	       // }  
	        parent.document.getElementById("main_iframe").scrolling = "no";  
	        parent.document.getElementById("main_iframe").height = "";  
	        parent.document.getElementById("main_iframe").style.height = "";  
	        parent.document.getElementById("main_iframe").height = document.body.scrollHeight + dvalue;  
	      };
	      if(window.iframeResize){  
	          window.iframeResize();  
	      }
	});
	</script>
</body>
</html>